package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.entity.enums.EvaluationStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 
 * @TableName order_evaluation
 */
@TableName(value ="order_evaluation")
@Data
public class OrderEvaluation implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 删除标志 true/false 删除/未删除
     */
    @TableField(value = "delete_flag")
    private Boolean deleteFlag;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 评价内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 商品ID
     */
    @TableField(value = "goods_id")
    private Long goodsId;

    /**
     * 商品图片
     */
    @TableField(value = "goods_image")
    private String goodsImage;

    /**
     * 商品名称
     */
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 商品评价分数
     */
    @TableField(value = "grade")
    private BigDecimal grade;

    /**
     * 评价是否有图片
     */
    @TableField(value = "have_image")
    private Boolean haveImage;

    /**
     * 回复是否有图片
     */
    @TableField(value = "have_reply_image")
    private Boolean haveReplyImage;

    /**
     * 评价图片
     */
    @TableField(value = "images")
    private String images;

    /**
     * 会员ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 会员名称
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 会员头像
     */
    @TableField(value = "user_profile")
    private String userProfile;

    /**
     * 评价回复
     */
    @TableField(value = "reply")
    private String reply;

    /**
     * 评价回复图片
     */
    @TableField(value = "reply_image")
    private String replyImage;

    /**
     * 店铺ID
     */
    @TableField(value = "store_id")
    private Long storeId;

    /**
     * 0未评价，1已评价，2已默认好评
     */
    @TableField(value = "status")
    private EvaluationStatusEnum status;

    /**
     * 回复状态
     */
    @TableField(value = "reply_status")
    private Boolean replyStatus;

    /**
     * 物流评分
     */
    @TableField(value = "delivery_score")
    private Integer deliveryScore;

    /**
     * 描述评分
     */
    @TableField(value = "good_score")
    private Integer goodScore;

    /**
     * 服务评分
     */
    @TableField(value = "service_score")
    private Integer serviceScore;

    /**
     * 店铺名称
     */
    @TableField(value = "store_name")
    private String storeName;

    /**
     * 订单项ID
     */
    @TableField(value = "order_item_id")
    private Long orderItemId;

    /**
     * 订单编号
     */
    @TableField(value = "order_sn")
    private String orderSn;

    /**
     * skuID
     */
    @TableField(value = "sku_id")
    private Long skuId;

    /**
     * 根评价id
     */
    @TableField(value = "root_id")
    private Long rootId;

    /**
     * 评论类型 ，与评分对应 ，1（好评5-4）2（中评3-2）3（差评1）
     */
    @TableField(value = "type")
    private Integer type;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}